As is known, a contaminant-detecting apparatus for determining presence/absence of a contaminant mixed in a product to be tested by using an X-ray transmission image is constituted by a convey means for conveying the product to be tested, an X-ray source means for radiating X-rays toward the product to be tested, an X-ray detecting means for detecting the intensity of X-rays transmitted through the product to be tested, a storage means for storing a signal obtained with the X-ray detecting means as an X-ray transmission image, and a processing means for image-processing the transmission image to determine the presence/absence of a mixed contaminant at high speed.
In a contaminant-determining apparatus of this type, a belt is usually used as the conveying means.
As the X-ray source means, a high-voltage X-ray tube is used which causes electrons, emitted from the high-voltage cathode filament in vacuum, to collide against the metal, e.g., tungsten, of the anode filament, thereby generating X-rays.
As the X-ray detecting means, a linear-array detector arranged perpendicular to the traveling direction of the belt, an X-ray imaging tube, or the like is used.
As the storage means for storing the X-ray transmission image, a semiconductor memory is used.
The processing means is constituted by a feature extracting means, based on image processing techniques, for extracting features from the transmission image, and a determining means for determining the presence/absence of a contaminant by comparing the extracted features with predetermined criteria.
In the conventional contaminant-detecting apparatus having the above arrangement, the contaminant detecting performance is largely influenced by the image processing technique used for extracting the feature from the transmission image.
Various techniques have been proposed as image processing techniques of this type. Most of the image processing techniques proposed so far use a small square pixel kernel of 3.times.3 pixels.
As an example, a "contaminant-detecting apparatus" disclosed in Jpn. Pat. Appln. KOKAI Publication No. 63-236989 is available.
According to this prior art, a transmission image detected by using radiation is subjected to enhancement, and is thereafter binarized, thereby obtaining a binary image of an object contained in the product to be tested.
Three features, i.e., the area, the peripheral length, and the sum-of-intensity of the object are calculated based on the binary image. These three features are compared with predetermined determination criteria. When the three features satisfy determination conditions, the object is determined to be a contaminant.
In this case, enhancement of the transmission image employs two 3.times.3 Sobel-filters which respectively perform image enhancement in the vertical and horizontal directions at high speed.
The two images respectively enhanced in the vertical and horizontal directions are finally summed to obtain one enhanced image.
The Sobel-filter is known well as a first-degree-differential-filter for an image, and is often used in image enhancement.
In the field of the conventional contaminant-detecting apparatus using an X-ray transmission image described above, the presence/absence of contaminant must be determined by image-processing a product to be tested, which is being conveyed at a practical belt speed, in real time.
For this reason, as the image processing technique, one using a 3.times.3 pixel kernel is mainly used since it requires a small number of operations and it can perform high-speed processing, as in the precedent example described above.
More specifically, conventionally, the technique using a kernel equal to or larger than 7.times.7 pixels, which is employed in the present invention as will be described later, is not considered at all since it requires a large number of operations and can perform processing only at low speed.
Even after a high-speed CPU is introduced and the operations can be performed at a practical speed, a technique using a kernel equal to or larger than 7.times.7 pixels has not been considered.
In the contaminant-detecting apparatus of this type, when enhancing a transmission image, the density of transmission image of a product to be tested, e.g., food, is sometimes enhanced excessively to obtain a signal indicating as if a contaminant existed.
This signal will be called a false-reject signal. In contrast to this, a signal actually obtained because of the presence of a contaminant will be called a contaminant signal. Conventionally, it is sometimes difficult to discriminate a contaminant signal and false-reject signal from each other.
In other words, the conventional contaminant-detecting apparatus does not perform highly selective image processing, and the contaminant detecting sensitivity is accordingly low.